﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace XRM.Security.DataAccess.Models
{
    [Table("InfoSystemFile")]
    public class InfoSystemFile
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int InfoSystemFileId { get; set; }
        
        [Required]
        [MaxLength(255)]
        public string FileName { get; set; }

        public byte[] FileData { get; set; }

        [Required]
        public DateTime UploadDate { get; set; }

        public int InfoSystemId { get; set; }

        [ForeignKey("InfoSystemId")]
        public virtual InfoSystem InfoSystem { get; set; }
    } 
}
